"""
author:mzy
date:2022/10/8
"""
import unittest
# from get_data import get_result
import json
from get_path import BASE_DIR
from methods import login
from parameterized import parameterized
from htmltestreport import HTMLTestReport

# get_result()

with open("./data/data.json",'r',encoding='utf-8') as f:
    b = json.load(f)
    print(b)

class TestLogin(unittest.TestCase):
    @parameterized.expand(b)
    def testlogin(self,num):
        print("num={}".format(num))
        login(num)
        # self.assertEqual(result,"")

suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestLogin))
report_path = BASE_DIR + "/report/test1.html"
my_runner = HTMLTestReport(report_path,"余额剩余购买藏品测试报告","mzy")
my_runner.run(suite)




